import { AxiosPromise } from 'axios'
// @ts-ignore
import request from '/@/utils/request'

const prefix = '/api/dms/customer/'
// 新增
export const customer_insert: (data: object) => AxiosPromise = (data) =>
  request(`${prefix}insert`, { data })
// 列表
export const customer_list: (data: object) => AxiosPromise = (data) =>
  request(`${prefix}list`, { data })
// 详情
export const customer_info: (data: object) => AxiosPromise = (data) =>
  request(`${prefix}info`, { data })
//更新
export const customer_update: (data: object) => AxiosPromise = (data) =>
  request(`${prefix}update`, { data })
//删除
export const customer_delete: (data: object) => AxiosPromise = (data) =>
  request(`${prefix}delete`, { data })
// 批量更新 updateBatch
export const customer_updateBatch: (data: object) => AxiosPromise = (data) =>
  request(`${prefix}updateBatch`, { data })
// 获取子公司 集团公司
export const customer_optionsList: (data: object) => AxiosPromise = (data) =>
  request(`${prefix}optionsList`, { data })

// 客户价目表
export const customerPriceList: (data: object) => AxiosPromise = (data) =>
  request(`${prefix}priceList`, { data })

// 客户价目表筛选项
export const customerPriceSearch: (data: object) => AxiosPromise = (data) =>
  request(`${prefix}priceSearch`, { data })

// 客户价目表详情
export const customerPriceInfo: (data: object) => AxiosPromise = (data) =>
  request(`${prefix}priceInfo`, { data })

// 客户价目表停用
export const customerPriceStop: (data: object) => AxiosPromise = (data) =>
  request(`${prefix}priceStop`, { data })

// 客户价目表创建
export const getCustomerPriceCreate: (data: object) => AxiosPromise = (data) =>
  request(`${prefix}priceCreate`, { data })

// 客户价目表变更记录
export const getCustomerPriceLog: (data: object) => AxiosPromise = (data) =>
  request(`${prefix}priceLog`, { data })


// 客户价目表变更记录
export const customerPriceUpdate: (data: object) => AxiosPromise = (data) =>
  request(`${prefix}priceUpdate`, { data })

// 下单 客户价目表赛选项
// 客户价目表变更记录
export const customerPriceProductSelect: (data: object) => AxiosPromise = (data) =>
  request(`${prefix}priceProductSelect`, { data })


// 下单 客户价目表产品列表
export const customerPriceProductList: (data: object) => AxiosPromise = (data) =>
  request(`${prefix}priceProductList`, { data })

// 撤回客户价目表审核
export const customerPriceRevokeExamine: (data: object) => AxiosPromise = (data) =>
  request(`${prefix}priceRevokeExamine`, { data })
  // 查询工商信息
export const customerBusinessInfo: (data: object) => AxiosPromise = (data) =>
  request(`${prefix}businessInfo`, { data })
